{% extends 'base.html' %}

{% load static %}

{% block title %}
    Players
{% endblock %}

{% block content %}
<section id="showcase-inner" class="py-5 text-white">
    <div class="container">
      <div class="row text-center">
        <div class="col-md-12">
          <h1 class="display-4">Browse Our Teams</h1>
          <p class="lead">National Basketball Association</p>
        </div>
      </div>
    </div>
  </section>

  <!-- Breadcrumb -->
  <section id="bc" class="mt-3">
    <div class="container">
      <nav aria-label="breadcrumb">
        <ol class="breadcrumb">
          <li class="breadcrumb-item">
            <a href="{% url 'index' %}}">
              <i class="fas fa-home"></i> Home</a>
          </li>
          <li class="breadcrumb-item active"> Browse Team</li>
        </ol>
      </nav>
    </div>
  </section>

  <section id="listings" class="py-5">
    <div class="container">
      <div class=".start-5-data-table-listing">
        <table style="text-align:center">
          <thead>
          <tr>
            {% if westteams %}
            {% for team in westteams %}
            <td><img src=></td>
            {% endfor %}
            {% endif %}
            <th style="height:100px">球隊数据</th>
            {% if eastteams %}
            {% for team in eastteams %}
            <td><img src=""></td>
            {% endfor %}
            {% endif %}           
          </tr>
          <tr>
            <td style="height:100px">東區</td>
            <th style="height:100px">:</th>
            <td style="height:100px">西區</td>            
          </tr>
          <tr>
            {% if westteams %}
            {% for team in westteams %}
            <td style="height:100px">{{ team.score }}</td>
            {% endfor %}
            {% endif %}
            <th style="height:100px">得分</th>
            {% if eastteams %}
            {% for team in eastteams %}
            <td style="height:100px">{{ team.score }}</td> 
            {% endfor %}
            {% endif %}             
          </tr>
          <tr>
            {% if westteams %}
            {% for team in westteams %}
            <td style="height:100px">{{ team.percentage_t }}</td>
            {% endfor %}
            {% endif %}
            <th style="height:100px">命中率</th>
            {% if eastteams %}
            {% for team in eastteams %}
            <td style="height:100px">{{ team.percentage_t }}</td> 
            {% endfor %}
            {% endif %}             
          </tr>
          <tr>
            {% if westteams %}
            {% for team in westteams %}
            <td style="height:100px">{{ team.threepercentage_t }}</td>
            {% endfor %}
            {% endif %}
            <th style="height:100px">三分球命中率</th>
            {% if eastteams %}
            {% for team in eastteams %}
            <td style="height:100px">{{ team.threepercentage_t }}</td> 
            {% endfor %}
            {% endif %}             
          </tr>
          <tr>
            {% if westteams %}
            {% for team in westteams %}
            <td style="height:100px">{{ team.rebound_t }}</td>
            {% endfor %}
            {% endif %}
            <th style="height:100px">籃板球</th>
            {% if eastteams %}
            {% for team in eastteams %}
            <td style="height:100px">{{ team.rebound_t }}</td> 
            {% endfor %}
            {% endif %}             
          </tr>
          <tr>
            {% if westteams %}
            {% for team in westteams %}
            <td style="height:100px">{{ team.assists_t }}</td>
            {% endfor %}
            {% endif %}
            <th style="height:100px">助攻</th>
            {% if eastteams %}
            {% for team in eastteams %}
            <td style="height:100px">{{ team.assists_t }}</td> 
            {% endfor %}
            {% endif %}           
          </tr>
          </thead>
        </table>
    </div>
  </section>
      {% endblock %}